<template>
  <div class="row">
    <div class="col-sm-3">
      <img :src="pic" class="img-rounded">
    </div>
    <div class="col-sm-9">
      <h3>专辑&nbsp;&nbsp;&nbsp;<small>{{name}}</small></h3>
      <h4>歌手&nbsp;&nbsp;&nbsp;<small>{{artistName}}</small></h4>
      <h4>发行时间&nbsp;&nbsp;&nbsp;<small>{{publishTime}}</small></h4>
      <h4>发行公司&nbsp;&nbsp;&nbsp;<small>{{company}}</small></h4>

    </div>
  </div>
</template>

<script>
  import {albumList} from '../request/req'

  export default {
    name: "music_list",
    created() {
      albumList(this.$route.params.id).then(res => {
        this.list_data = res.data;
        this.pic=res.data.album.picUrl;
        this.artistName=res.data.album.artist.name;
        this.name=res.data.album.name;
        this.company=res.data.album.company;
        this.publishTime=new Date(res.data.album.publishTime).toLocaleDateString();
      })
    },
    data() {
      return {
        list_data: {},
        name:'',
        artistName:'',
        pic:'',
        company:'',
        publishTime:'',
        songs:''
      }
    }
  }
</script>

<style scoped>
  .img-rounded {
    height: 200px;
    width: 200px;
  }
</style>
